    <!-- 右 -->
    <div class="content">
        <div class="header">
            <h1 class="page-title">管理员编辑</h1>
        </div>

        <div class="well">
            <!-- add form -->
            <form action="{:url('/admin/User/update')}" method="post" id="tab">
                {:token()}
                <!-- 隐藏的用户id -->
                <input type="hidden" name="id" value="{$data.id}">
                <label>用户名：</label>
                <input type="text" name="username" id="user" value="{$data.username}" class="input-xlarge">
                <label>手机号：</label>
                <input type="text" name="phone" id="nick" value="{$data.phone}" class="input-xlarge">

                <p><span>登录状态：<input type="checkbox" id="sta" name="is_check" value="1" {if($data.is_check == 1)} checked="checked" {/if} class="input-xlarge"></span></p>

                <button class="btn btn-primary" type="button">保存</button>
            </form>
        </div>
    </div>
    <script>
        $(".btn-primary").click(function(){

            var flag = true;

            if($("#nick").val() == "" || $("#user").val() == "" ){
                alert("亲！不允许为空哦");
                flag = false;
            }

            if(flag){
                $("#tab").submit();
            }
        })
    </script>